package com.example.tingsugar.service;

import com.example.tingsugar.bean.AlbumAvgPlayDurationBean;
import com.example.tingsugar.bean.HourPlayDurationBean;
import com.example.tingsugar.mapper.UserPlayMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author lzc
 * @Date 2023/4/16 15:36
 */
@Service
public class UserPlayServiceImpl implements UserPlayService {
    
    @Autowired
    UserPlayMapper userPlayMapper;
    @Override
    public List<AlbumAvgPlayDurationBean> statsPlayDuration(Integer date) {
        return userPlayMapper.statsPlayDuration(date);
    }
    
    @Override
    public BigDecimal avgDuration(Integer date) {
        return userPlayMapper.avgDuration(date);
    }
    
    @Override
    public List<HourPlayDurationBean> statsHourPlay(Integer date) {
        return userPlayMapper.statsHourPlay(date);
    }
    
}
